package com.eastfair.venuebooking.api;

import com.eastfair.core.base.R;
import com.eastfair.venuebooking.vo.ExhibitionSpaceVO;
import com.eastfair.venuebooking.vo.SpaceVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 展会场地 feign.
 *
 * @author dqq
 * @date 2022 /7/22
 */
@FeignClient(value = "venue-booking/space")
public interface SpaceFeign {

    /**
     * 场馆同步回调
     * @param ids ids
     * @return R<Boolean>
     */
    @ApiOperation(value = "场馆同步回调", notes = "场馆同步回调")
    @PostMapping("/syncCallback")
    R<Boolean> syncCallback(@RequestBody List<Long> ids);

    /**
     * 查询未同步的所有展厅
     *
     * @return R
     */
    @ApiOperation(value = "查询未同步的所有展厅", notes = "查询未同步的所有展厅")
    @PostMapping("/queryNeedSyncSpace")
    R<List<SpaceVO>> queryNeedSyncSpace();

    /**
     * 展厅名称查询展厅.
     *
     * @param spaceName the space name
     * @return the by space name
     */
    @GetMapping("/get/spaceName/{spaceName}")
    R<SpaceVO> getBySpaceName(@PathVariable("spaceName") String spaceName);
}